<template>
  <div class="device-view">
    <ViewTab v-for="(item, index) in address" :key="index" :address="item"></ViewTab>
  </div>
</template>

<script>
import request from '@/api/request';
import ViewTab from '../components/view_tab.vue'

export default {
  created() {
    this.getAddress()
  },
  components: {
    ViewTab
  },
  data() {
    return {
      address: null
    }
  },
  methods: {
    getAddress() {
      request.get('http://localhost:5000/address/select').then(function (response) {
        console.log(response)
        this.address = response.data
      }.bind(this))
    }
  }

}
</script>

<style>

.device-view {
  width: 100%;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-evenly;
}

</style>
